const BASE_URL = 'https://www.uinav.com'

function request(options) {
  return new Promise(resolve=>{
    wx.request({
      url: BASE_URL + options.url,
      success: (res)=> {
        // 解构的写法，取res.data对象里面的status和message
        let { meta, message } = res.data
        if (meta.status === 200) {
          resolve(message)
        }
      }
    })
  })
}

export default request